Caffeine Driven Development
Come off it and tell us what it is you do!?
I'm reinventing the square wheel :) I'll post something later, hold on!
Heeeeeeeeeeeeeeee, what about me? :-) http://bloggingabout.net/blogs/jpsmit
Very cool! Looking forward to some free time to dig into the query parser. I want to create one of these for a project I'm working on, but so far it's as clear as mud. Your example is much appreciated!
Dont forget to provide support for properties that are a ref-type/class and have properties themselves. Like TextBox.Size.Width or TextBox.Location.X (I just made up the property names). You should be able to handle Control.Property.Property.Property.Property.Property and not crash when any of those is null ;-)
Thanks for your reply Scott! Make sure to mail me if you have any questions.
Ah. But shouldn't it read 'Ritalin driven development' instead of... >:) Way to go Emile... Enjoyed your Wmi thingy...
Although I see some usefullness for it I don't recommend it at all. This is because casting will create a new object instead of a reference to the original object. When you don't pass a reference but a new object then it is better to use a property or conversion method.
Ramon, could you explain this to me? As far as i can see you gain more control by implementing your own operator, its then up to the developer wheter to return an new instance or a reference to it.
Sure... Take a look at the msdn sample here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkuser-definedconversionstutorial.asp The sample uses struct so they are value types. Pretend that they are reference types / objects. Now the following sample: ------ RomanNumeral r1, r2; r1 = 10; r2 = r1; r1 = 8; Trace.Assert( (int)r1 == (int)r2, "The damn objects don't represent the same state." ) ------ This is why I don't like them. If I would 'read' code and would see such a construction that I would expect that the state of the objects would be the same. But their not so let's not use (explicit) operators in such case. Explicit operators are only interesting with valuetypes because you know that their behaviour is different. The MSDN samples much better then your sample here.
First of all, the sample i've used is is directly taken from lutz roeders reflector source code on xlinq's Xattribute class, its not intended to be better than msdn' sample in any way. I do agree with the reading experience part, if you read this you could assume that r1 and r2 are the same value. Nevertheless, the behaviour you see here is expected. Even if you remove the (int) type conversion operator and make a property or a method out of it, the two values would still differ.
For value types, that behavior looks quite normal. I do agree with Ramon though that for reference types, implementing an explicit (or implicit) casting operator by returning a new instance could be confusing. Classes doing this should also have an appropriate Equals method implemented (and GetHashCode).
>Update: Added another beloved collegue: Jean-Paul Smit:-) Wow, some major loving going on over there at Macaw! :)
NOW THATS COOL - http://bloggingabout.net/blogs/emile/archive/2005/12/12/10514.aspx
Heeee, Mielz! Back from down-under, hee mate. Are you "living proof of life after death"? :-D What is going to be your next project (besides getting over your jet-lag ;-)?
Here are some useful links to LINQ information. Core Microsoft LINQ Sites · Try it yourself: download
Welcome to the 27th Community Convergence. I use this column to keep you informed of events in the C#
An Updated LINQ to WMI Implementation
I've recently updated the list of LINQ Providers found on my Links to LINQ page, accessible from the
I've recently updated the list of LINQ Providers found on my Links to LINQ page, accessible from
Pingback from Hecgo.com » Linq to ... everything: A List of LINQ Providers
I mentioned in a post a little while ago about the various LINQ To projects I had seen, but Charlie Calvert
LINQ Providers LINQ to Amazon LINQ to Active Directory LINQ over C# project LINQ to CRM LINQ To Geo
Pingback from Jacques Snyman » LINQ To …
Linq to everything
LINQ to [AnyWhere]
Pingback from LINQ to [AnyWhere]
Here are some useful links to LINQ information. Use the comments or write me if you want to add to this
Офіційні: LINQ to SQL (DLINQ) LINQ to XML (XLINQ) LINQ to XSD LINQ to Entities BLINQ PLINQ Неофіційні
Pingback from A List of LINQ Providers « vincenthome’s Tech Clips
This weekend I’ve built a small application, which queries the “Simpsons” seasons guide data and updates
Pingback from Tune Up Your PC » Post Topic » LINQ-To-Everywhere ??? List of LINQ Providers
摘要:微软在.NET3.5中推出了LINQ,现在各种LINQProvider满天飞,TerryLee在老外站点上收集了一份LINQProvider列表 微软在.NET3.5中推出了L...